//
//  GoodsView.m
//  HAODE
//
//  Created by panquanReabam.com on 15/9/24.
//  Copyright (c) 2015年 reabam.com. All rights reserved.
//

#import "GoodsView.h"

@implementation GoodsView


- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        UIView *label_backgound = [[UIView alloc]initWithFrame:CGRectMake(0,0, ScreenWidth, 120)];
        [label_backgound setBackgroundColor:[UIColor whiteColor]];
        [self addSubview:label_backgound];

        [_headImageFull.layer setCornerRadius:4.0];
        [_headImageFull.layer setBorderWidth:0.3];
        [_headImageFull.layer setMasksToBounds:YES];
        CGColorSpaceRef colorSpace2 = CGColorSpaceCreateDeviceRGB();
        CGColorRef colorref2 = CGColorCreate(colorSpace2,(CGFloat[]){ 0, 0, 0, 0.3 });
        [_headImageFull.layer setBorderColor:colorref2];//边框颜色
        _headImageFull = [[UIImageView alloc]init];
        _headImageFull.frame = CGRectMake(15, 15, 85, 85);
        [label_backgound addSubview:_headImageFull];
        
        _itemName = [[UILabel alloc]init];
        _itemName.frame = CGRectMake(_headImageFull.right+10, 12, ScreenWidth*500/750,36);
        _itemName.numberOfLines=0;
        _itemName.textColor=[UIColor blackColor];
        _itemName.font=[UIFont systemFontOfSize:15];
        [label_backgound addSubview:_itemName];
        
        
        _itemType = [[UILabel alloc]init];
        _itemType.frame = CGRectMake(_headImageFull.right+10, 62, ScreenWidth-120, 13);
        _itemType.font=[UIFont systemFontOfSize:13];
        _itemType.textColor=shenhuiColor;
        [label_backgound addSubview:_itemType];

        _quantity = [[UILabel alloc]init];
        _quantity.frame = CGRectMake(_headImageFull.right+10, _itemType.bottom+7, 70, 13);
        _quantity.font=[UIFont systemFontOfSize:14];
        _quantity.textColor=shenhuiColor;
        [label_backgound addSubview:_quantity];

        
        _dealPrice = [[UILabel alloc]init];
        _dealPrice.frame = CGRectMake(_quantity.right+10, _itemType.bottom+5, ScreenWidth*500/750,16);
        _dealPrice.font=[UIFont systemFontOfSize:18];
        _dealPrice.textColor=shenhuiColor;
        [label_backgound addSubview:_dealPrice];

        
        _deliveryQty = [[UILabel alloc]init];
        _deliveryQty.frame = CGRectMake(ScreenWidth-250, _dealPrice.bottom+5, 230,12);
        _deliveryQty.font=[UIFont systemFontOfSize:12];
        _deliveryQty.textAlignment=NSTextAlignmentRight;
        _deliveryQty.textColor=zhonghuiColor;
        [label_backgound addSubview:_deliveryQty];

        
        
        UILabel*label=[[UILabel alloc]initWithFrame:CGRectMake(10, 120-0.35, ScreenWidth-20, 0.35)];
        label.backgroundColor=qianhuiColor;
        [self addSubview:label];
        
    }
    return self;
}


@end
